/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 涛
 * Date: 2023-09-21
 * Time: 20:11
 */
public class Test5 {
    public static void main(String[] args) {
        int[] array = {1,2,3};
        try {
            System.out.println("Before");
            //array = null;
            System.out.println(array[100]);
            System.out.println("After");
        } catch(ArrayIndexOutOfBoundsException | NullPointerException e) {
            System.out.println("下标越界");
            e.printStackTrace();
        }
        System.out.println("After try catch");
    }
}
